import {HTTP} from '../utils/http'

class AddressModel extends HTTP{
  list(current,size){
    return this.request({
      url:'user/address/getAddressPageList',
      data:{
        'size': size || 10,
        'current': current || 1,
      }
    })
  }
  
  save(data){
    return this.request({
      url: 'user/address/saveOrUpdate',
      data: data
    })
  }

  detail(id){
    return this.request({
      url: 'user/address/getUserAddress',
      data: {'id': id,}
    })
  }

  del(id){
    return this.request({
      url:'user/address/del',
      data:{'id': id,}
    })
  }
}

export {AddressModel}